package com.ruoyi.web.shopping.service.impl;

import com.ruoyi.web.shopping.entity.Prices;
import com.ruoyi.web.shopping.mapper.PricesMapper;
import com.ruoyi.web.shopping.service.PricesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PricesServiceImpl implements PricesService {

    @Autowired
    private PricesMapper pricesMapper;

    /**
     * 查询价格
     *
     * @param id
     * @return
     */
    public Prices selectById(String id) {
        Prices prices = pricesMapper.selectById(id);
        return prices;
    }


    /**
     * 修改价格
     *
     * @param prices
     */
    public void update(Prices prices) {
        pricesMapper.update(prices);
    }

    /**
     * 删除价格
     *
     * @param id
     */
    public void deleteById(String id) {
        pricesMapper.deleteById(id);
    }

    /**
     * 新增价格
     *
     * @param prices
     */
    public void save(Prices prices) {
        pricesMapper.save(prices);
    }
}
